https://leetcode.cn/problems/split-the-array/description/

class Solution {
public:
    bool isPossibleToSplit(vector<int>& nums) {

        int a[110] = { 0 };

        for (int i = 0; i < nums.size(); i++)
        {
            int num = nums[i];
            a[num]++;

            if (a[num] > 2)
                return false;
        }

        return true;
    }
};